<%@page import="java.io.File"%>
<%@page import="org.gpf.util.FileUploadTool"%>
<%@ page language="java" import="java.util.*" contentType="text/html; charset=utf-8"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>fileupload.jsp</title>
  </head>
  
  <body>
<% 
	FileUploadTool fut = new FileUploadTool(request,3*1024*1024,getServletContext().getRealPath("/") + "uploadtemp");
	String name = fut.getParameter("uname");
	String[] inst = fut.getParameterValues("inst");
	List<String> all = fut.saveAll(getServletContext().getRealPath("/") + "file_upload" + File.separator);
	
%>
	姓名：<%=name %><br>
	兴趣：
<%
	if (inst != null){
		for (String s : inst) {
%>
		<%=s %>；
<%	
		}
	}
	Iterator<String> iterator = all.iterator();
	while(iterator.hasNext()){
		
%>
		<img alt="" src="file_upload/<%=iterator.next() %>">
<%	
	}
 %>
  </body>
</html>
